package com.wpre.springaop.controller;

import com.wpre.springaop.aspect.TimeRecord;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-11-24
 * Time: 17:55
 */
@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {

    @RequestMapping("/t1")
    public String test1() {
        log.info("执行t1");
        return "t1";
    }

    @TimeRecord
    @RequestMapping("/t2")
    public String test2() {
        log.info("执行t2");
        return "t2";
    }

    @RequestMapping("/t3")
    public String test3() {
        log.info("执行t3");
        return "t3";
    }


}
